
// 此文件专门用于创建整个引用的路由
import VueRouter from "vue-router";

import Home from "../components/Home"
import ClassManagement from "../components/ClassManagement"
import News from "../components/classManagement/News"
import Topic from "../components/classManagement/Topic"
// 创建一个路由器
const router = new VueRouter({
    routes:[
        {
            path:"/home",
            component: Home
        },
        {
            path:"/classManagement",
            component:ClassManagement,
            // 嵌套路由
            children:[
                {
                    path:"news",
                    component:News
                },{
                    path:"topic",
                    component:Topic
                }
            ]
        }
    ]
});

export default router;